#ifndef	_DEMO_GAME_STATE_BASE_H_
#define	_DEMO_GAME_STATE_BASE_H_

#include"GlobalDef.h"
#include"DEMOSprite.h"

#include"DEMOTank_Base.h"
#include"DEMOTank_Trial.h"

#include"DEMOTank_Factory.h"

#include"DEMO_Actor.h"
#include"DEMOI_InputOb.h"

#include<vector>
using namespace std;

extern class DEMOGameState_Context;
class DEMOGameState_Base
{
protected:
	//const DEMOGameState_Context* m_context;
	DEMOGameState_Context* m_context;

	vector< DEMO_Actor> _actorList;			//	we should use RTTI check if the actor IsA DEMOI_InputOb subtype instance.
	//vector< DEMOI_InputOb> _inputList;

public:
	virtual void OnInit(DEMOGameState_Context* const ownerContext) = 0;
	virtual void OnDestroy() = 0;

	virtual bool Tick(float dt) = 0;
	virtual bool Render() = 0;

	virtual bool OnInput(hgeInputEvent theEvent) = 0;


	void registActor();
};


class DEMOGameState_Test1:public DEMOGameState_Base
{
private:
	hgeFont*		m_fnt;
	DEMOTank_Factory	*_tankFactory;
	DEMOTank_Base		*_testTank;
public:
	DEMOGameState_Test1();
	~DEMOGameState_Test1();

	void OnInit(DEMOGameState_Context* const ownerContext);
	void OnDestroy();

	bool Tick(float dt);
	bool Render();

	bool OnInput(hgeInputEvent theEvent);

};

class DEMOGameState_Test2:public DEMOGameState_Base
{
private:
	hgeFont*		m_fnt;
public:
	DEMOGameState_Test2();
	~DEMOGameState_Test2();

	void OnInit(DEMOGameState_Context* const ownerContext);
	void OnDestroy();

	bool Tick(float dt);
	bool Render();


	bool OnInput(hgeInputEvent theEvent);
};

#endif	_DEMO_GAME_STATE_BASE_H_